<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        $index=M('index');
        $indexData=$index->select();
        $this->assign("index",$indexData[0]);
        $this->display();
    }
    public function class_more(){
    	$class=M('class');
    	$classData=$class->select();
    	$this->ajaxReturn($classData);
    }
    public function class_detail(){
        $id=$_GET['id'];
        $class=M('class');
        $classData=$class->where('id='.$id)->select();
        // var_dump($classData);
        $this->assign("classdata",$classData[0]);
        $this->display();
    }
}